﻿@model AutoSign.Areas.Baidu.ViewModels.BindViewModel

@{
    ViewBag.Title = "添加绑定-百度账号";
}

<div class="container">
    <h2>添加百度账号的绑定</h2>
    <div>
        <!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active"><a href="#tab1" aria-controls="tab1" role="tab" data-toggle="tab">通过账号密码绑定</a></li>
            <li role="presentation"><a href="#tab2" aria-controls="tab2" role="tab" data-toggle="tab">通过Cookie绑定(推荐)</a></li>
        </ul>
        <!-- Tab panes -->
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane active" id="tab1">
                @using (Html.BeginForm())
                {
                    @Html.AntiForgeryToken()

                    <div class="form-horizontal">
                        <hr />
                        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                        <div class="form-group">
                            @Html.LabelFor(model => model.name, htmlAttributes: new { @class = "control-label col-md-2" })
                            @Html.ValidationMessageFor(model => model.name, "", new { @class = "text-danger" })
                            <div class="col-md-10">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
                                    @Html.EditorFor(model => model.name, new { htmlAttributes = new { @class = "form-control",placeholder="请输入百度账号" } })
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            @Html.LabelFor(model => model.pwd, htmlAttributes: new { @class = "control-label col-md-2" })
                            @Html.ValidationMessageFor(model => model.pwd, "", new { @class = "text-danger" })
                            <div class="col-md-10">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
                                    @Html.EditorFor(model => model.pwd, new { htmlAttributes = new { @class = "form-control", placeholder = "请输入密码" } })
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-offset-2 col-md-10">
                                <input type="submit" value="绑定" class="btn btn-block btn-primary" />
                            </div>
                        </div>
                    </div>
                }
            </div>
            <div role="tabpanel" class="tab-pane" id="tab2">
                @using (Html.BeginForm())
                {
                    @Html.AntiForgeryToken()

                    @Html.Hidden("type","2")


                    <div class="form-horizontal">
                        <hr />
                        @Html.ValidationSummary(true, "", new { @class = "text-danger" })


                        <div class="form-group">
                            <label class="control-label col-md-2">Cookie</label>
                            <div class="col-md-10">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
                                    <input class="form-control" type="text" placeholder="请输入账号Cookie" />
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-md-offset-2 col-md-10">
                                <input type="submit" value="绑定" class="btn btn-block btn-primary" />
                            </div>
                        </div>
                    </div>
                }
            </div>
        </div>
    </div>
    <div>
        <a class="btn btn-default" href="@Url.Action("Index")">&larr; 返回</a>
    </div>
</div>
